<template>
  <el-form :inline="true" @submit.native.prevent>
    <el-form-item>
      <el-button type="primary" @click="$emit('onShowEdit')">
        {{ $t('Tenant.addTenant') }}
      </el-button>
    </el-form-item>

    <el-form-item>
      <el-input
        v-model="formSearch.codeOrName"
        :placeholder="$t('Tenant.searchTenant')"
        prefix-icon="el-icon-search"
        @keyup.enter.native="onSearch"
      />
    </el-form-item>
    <el-form-item>
      <el-button
        type="primary"
        @click="onSearch"
      > {{ $t('btns.search') }}</el-button>
    </el-form-item>
  </el-form>
</template>

<script>
export default {
  data() {
    return {
      formSearch: {},
      
    }
  },
  methods: {
    // 回车查询
    onSearch() {
      this.$store.commit(
        'tenement/UPDATE_CONDITIONS',
        Object.assign({}, this.conditions, this.formSearch)
      )
    },
    
  }
}
</script>

<style lang="scss" scoped>
$bg-color: #9580f9;
.name-str {
  color: $bg-color;
}
.demo-form-inline {
  .formTitle {
    background-color: #f4f4f4;
    height: 24px;
    line-height: 24px;
    padding-left: 14px;
    color: #000;
    
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 14px;
  }
  .el-form-item {
    display: block;
    margin: 20px 0 20px 40px;
    >>> .el-form-item__content {
      margin: 0 !important;
    }
  }
  .itemTop {
    >>> .el-form-item__content {
      width: 450px;
      margin-left: 100px;
      margin: 0;
    }
  }
  .address {
    >>> .el-select {
      width: 143px;
      margin: 0 4px 3px 0px;
    }
  }
  .buyServe {
    padding-left: 100px;
  }
  .manage {
    display: inline-block;
    margin-left: 45px;
    margin-top: 5px;
  }
  .manageName {
    display: inline-block;
    margin: 0;
    >>> .el-form-item__label {
      width: 60px !important;
    }
  }
  .managePhone {
    display: inline-block;
    margin: 0;
  }
}
</style>
